home *** CD-ROM | disk | FTP | other *** search
- tell application "QuickTime Player"
- launch
- activate
- stop every movie
-
- try
- -- CHECK FOR THE CORRECT VERSION OF QUICKTIME
- set the QT_version to (the QuickTime version as string)
- set the player_version to (the version as string)
- set the required_version to "5.0.2"
- if (the QT_version is less than the required_version) or ¬
- (the player_version is less than the required_version) then
- set the error_message to "This script requires QuickTime " & the required_version & " or greater." & ¬
- return & return & ¬
- "Current QuickTime Version: " & QT_version & return & ¬
- "Current QuickTime Player Version: " & player_version
- my upgrade_QT(error_message)
- end if
-
- -- CHECK FOR QUICKTIME PRO
- if QuickTime Pro installed is false then
- set the error_message to "This script requires a QuickTime Pro installation on this system."
- my upgrade_QT(error_message)
- end if
-
- make new movie
- set this_track to make new track at movie 1 with data " "
- tell movie 1
- set the full text of annotation "Full Name" to "Text Frame Properties"
- -- set controller type to none
- tell track 1
- set dimensions to {160, 48}
- tell frame 1
- set dimensions to {160, 48}
-
- my reset_defaults("Text Frame Properties:")
- delay 1
-
- my reset_defaults("Default Font")
- repeat with this_font in {"Chicago", "Charcoal", "Courier", "Times", "Geneva"}
- set contents to ""
- set the default font to this_font
- set the default font size to 24
- set the contents to this_font
- delay 1
- end repeat
-
- my reset_defaults("Default Font Size")
- repeat with this_size in {9, 10, 12, 14, 18, 24}
- set contents to ""
- set the default font size to this_size
- set contents to ((this_size as string) & " point")
- delay 1
- end repeat
-
- my reset_defaults("Justification")
- set the justification_types to {"Left", "Center", "Right"}
- set the justification_values to {left, center, right}
- repeat with i from 1 to the count of the justification_values
- set contents to ""
- set the default font size to 18
- set the justification to item i of the justification_values
- set the contents to item i of the justification_types
- delay 1
- end repeat
-
- my reset_defaults("Foreground Color" & return & "(Text Color)")
- set the RGB_values to {{0, 0, 0}, {65535, 65535, 65535}, {65535, 0, 0}, {0, 65535, 0}, {0, 0, 65535}}
- set the RGB_names to {"Black", "White", "Red", "Green", "Blue"}
- repeat with i from 1 to the count of the RGB_values
- set the contents to ""
- set the default font size to 24
- if item i of the RGB_names is "White" then
- set the background color to {0, 0, 0}
- else
- set the background color to {65535, 65535, 65535}
- end if
- set the foreground color to item i of the RGB_values
- set the contents to item i of the RGB_names
- delay 1
- end repeat
-
- my reset_defaults("Background Color")
- set the RGB_values to {{0, 0, 0}, {65535, 65535, 65535}, {65535, 0, 0}, {0, 65535, 0}, {0, 0, 65535}}
- set the RGB_names to {"Black", "White", "Red", "Green", "Blue"}
- repeat with i from 1 to the count of the RGB_values
- set the contents to ""
- set the default font size to 24
- if item i of the RGB_names is "Black" then
- set the foreground color to {65535, 65535, 65535}
- else
- set the foreground color to {0, 0, 0}
- end if
- set the background color to item i of the RGB_values
- set the contents to item i of the RGB_names
- delay 1
- end repeat
-
- my reset_defaults("Background & Foreground")
- set the default font to "Chicago"
- set the default font size to 14
- set the foreground color to {65535, 0, 0}
- set the background color to {0, 0, 65535}
- set the contents to "Red text on Blue"
-
- my reset_defaults("")
- set the default font to "Chicago"
- set the default font size to 14
- set the foreground color to {0, 0, 65535}
- set the background color to {65535, 0, 0}
- set the contents to "Blue text on Red"
-
- my reset_defaults("")
- set the default font to "Chicago"
- set the default font size to 14
- set the foreground color to {65535, 65535, 0}
- set the background color to {0, 0, 0}
- set the contents to "Yellow text on Black"
-
- my reset_defaults("Anti-alias")
- set the default font size to 18
- set antialias to false
- set the contents to "anti-alias off"
-
- delay 1
-
- set the default font size to 18
- set antialias to true
- set the contents to "anti-alias on"
-
- my reset_defaults("Keyed Text")
- set the default font size to 18
- set keyed to false
- set the contents to "keyed text off"
-
- delay 1
-
- set the default font size to 18
- set keyed to true
- set the contents to "keyed text on"
-
- my reset_defaults("")
-
- set justification to left
- set the default font size to 24
- set y to " "
- repeat with i in "The End"
- set y to (y & i) as string
- set contents to y
- delay 1
- end repeat
-
- my reset_defaults("")
- end tell
- end tell
- end tell
- close movie 1 saving no
- on error error_message number error_number
- if the error_number is not -128 then
- beep
- display dialog error_message buttons {"Cancel"} default button 1
- end if
- end try
- end tell
-
- on reset_defaults(passed_text)
- delay 1
- tell application "QuickTime Player"
- -- activate
- stop every movie
- tell movie 1
- tell track 1
- tell frame 1
- set contents to ""
- set keyed to false
- set antialias to false
- set the default font size to 12
- set the default font to "Geneva"
- set the background color to {65535, 65535, 65535}
- set the foreground color to {0, 0, 0}
- set the justification to center
- set the contents to the passed_text
- end tell
- end tell
- end tell
- end tell
- delay 1
- end reset_defaults
-
- on upgrade_QT(passed_message)
- tell application "QuickTime Player"
- activate
- stop every movie
- set the target_URL to "http://www.apple.com/quicktime/download/"
- display dialog passed_message & return & return & ¬
- "If this computer is currently connected to the Internet, " & ¬
- "click the “Upgrade” button to visit the QuickTime Website." buttons {"Upgrade", "Cancel"} default button 2
- ignoring application responses
- tell application "Finder"
- open location target_URL
- end tell
- end ignoring
- error number -128
- end tell
- end upgrade_QT